home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / oserror.z / oserror
Encoding:
Text File  |  2002-10-03  |  3.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4. OOOOSSSSEEEERRRRRRRROOOORRRR((((3333CCCC))))                                                        OOOOSSSSEEEERRRRRRRROOOORRRR((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      oserror, setoserror, goserror - get/set system error
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<eeeerrrrrrrrnnnnoooo....hhhh>>>>
  13.  
  14.      iiiinnnntttt oooosssseeeerrrrrrrroooorrrr((((vvvvooooiiiidddd))));;;;
  15.  
  16.      iiiinnnntttt sssseeeettttoooosssseeeerrrrrrrroooorrrr((((ccccoooonnnnsssstttt iiiinnnntttt eeeerrrrrrrr))));;;;
  17.  
  18.      iiiinnnntttt ggggoooosssseeeerrrrrrrroooorrrr((((vvvvooooiiiidddd))));;;;
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      Most system calls and many system library functions set a global error
  22.      value _e_r_r_n_o when they encounter an error.  For single threaded
  23.      applications a global is sufficient.  For multi-threaded applications a
  24.      global error value loses much of its meaning, since multiple threads may
  25.      be updating the same value at the same time.  When a process turns
  26.      multi-threaded (by calling _ssss_pppp_rrrr_oooo_cccc(2)) a per-thread location to store the
  27.      error value is created.  _ssss_pppp_rrrr_oooo_cccc(2) and _iiii_nnnn_tttt_rrrr_oooo(2) have more information on
  28.      error handling.
  29.  
  30.      These routines provide access to the error values.  _oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr returns the
  31.      value in the global error location for single threaded applications and
  32.      returns the value in the per-thread error location for multi-threaded
  33.      applications.  This is equivalent to compiling the application with the
  34.      feature test macro ______SSSS_GGGG_IIII______MMMM_PPPP______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE defined and simply referencing _e_r_r_n_o.
  35.  
  36.      _ssss_eeee_tttt_oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr sets both the global error location and the per-thread error
  37.      location for the calling thread.  This is primarily used by library
  38.      routines.
  39.  
  40.      _gggg_oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr always returns the value in the global error location.
  41.  
  42.      Possible errors are listed in _e_r_r_n_o._h.
  43.  
  44. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  45.      _oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr, _gggg_oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr, and _ssss_eeee_tttt_oooo_ssss_eeee_rrrr_rrrr_oooo_rrrr return the current system error.
  46.  
  47. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  48.      intro(2), sproc(2), perror(3C).
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.